#include <stdio.h>

int main() {
    char a;
    int b = 0;
    while ((scanf_s("%c", &a)) != EOF)
    {

        if ((int)a >= 97)
        {
            b = (int)a - 32;
            printf("%c\n", b);
            int a = getchar();
        }
        else
        {
            b = (int)a + 32;
            printf("%c\n", b);
            int a = getchar();
        }
    }
    return 0;
}